using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Create ArcSDE Connection File</para>
    /// <para>Create a connection file to an ArcSDE workspace</para>
    /// <para>创建 ArcSDE 工作空间的连接文件</para>
    /// </summary>    
    [DisplayName("Create ArcSDE Connection File")]
    public class CreateArcSDEConnectionFile : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateArcSDEConnectionFile()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_out_folder_path">
        /// <para>ArcSDE Connection File Location</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_out_name">
        /// <para>ArcSDE Connection File Name</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_server">
        /// <para>Server</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_service">
        /// <para>Service</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public CreateArcSDEConnectionFile(object _out_folder_path, object _out_name, object _server, object _service)
        {
            this._out_folder_path = _out_folder_path;
            this._out_name = _out_name;
            this._server = _server;
            this._service = _service;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create ArcSDE Connection File";

        public override string CallName => "management.CreateArcSDEConnectionFile";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_out_folder_path, _out_name, _server, _service, _database, _account_authentication.GetGPValue(), _username, _password, _save_username_password.GetGPValue(), _version, _save_version_info.GetGPValue(), _connection_file_name];

        /// <summary>
        /// <para>ArcSDE Connection File Location</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("ArcSDE Connection File Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_folder_path { get; set; }


        /// <summary>
        /// <para>ArcSDE Connection File Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("ArcSDE Connection File Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Server")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _server { get; set; }


        /// <summary>
        /// <para>Service</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _service { get; set; }


        /// <summary>
        /// <para>Database</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Database")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database { get; set; } = null;


        /// <summary>
        /// <para>Database authentication</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Database authentication")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _account_authentication_value _account_authentication { get; set; } = _account_authentication_value._true;

        public enum _account_authentication_value
        {
            /// <summary>
            /// <para>DATABASE_AUTH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATABASE_AUTH")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>OPERATING_SYSTEM_AUTH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OPERATING_SYSTEM_AUTH")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Username</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Username")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _username { get; set; } = null;


        /// <summary>
        /// <para>Password</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _password { get; set; } = null;


        /// <summary>
        /// <para>Save username and password</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Save username and password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _save_username_password_value _save_username_password { get; set; } = _save_username_password_value._true;

        public enum _save_username_password_value
        {
            /// <summary>
            /// <para>SAVE_USERNAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SAVE_USERNAME")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_SAVE_USERNAME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_SAVE_USERNAME")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>The following transactional version will be used</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("The following transactional version will be used")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _version { get; set; } = null;


        /// <summary>
        /// <para>Save the transactional version name with the connection file</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Save the transactional version name with the connection file")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _save_version_info_value _save_version_info { get; set; } = _save_version_info_value._true;

        public enum _save_version_info_value
        {
            /// <summary>
            /// <para>SAVE_VERSION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SAVE_VERSION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_SAVE_VERSION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_SAVE_VERSION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Connection File Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Connection File Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _connection_file_name { get; set; }


        public CreateArcSDEConnectionFile SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}